package main

import "fmt"

type Point struct {
	x int
	y int
}

type People struct {
	name  string
	child *People
}

func printMsgType(msg *struct {
	id   int
	data string
}) {
	fmt.Printf("%T \n", msg)
}

func main() {
	relation := &People{
		name: "爷爷",
		child: &People{
			name: "爸爸",
			child: &People{
				name: "我",
			},
		},
	}

	fmt.Printf("%T \n", relation)

	var point Point
	fmt.Printf("%T \n", point)
	p := &Point{}
	fmt.Printf("%T \n", p)

	ins := struct {
		a int
		b int
	}{
		a: 1,
		b: 2,
	}
	fmt.Println(ins.a)

	msg := &struct {
		id   int
		data string
	}{
		id:   1,
		data: "hello",
	}
	printMsgType(msg)
}
